package com.ruoyi.mapper;

import com.ruoyi.domain.AdvIncome;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper接口
 *
 * @author ruoyi
 * @date 2024-05-13
 */
public interface AdvIncomeMapper
{
    @Delete("delete from  adv_income")
    public int clear();

    @Delete("delete from adv_income  where adv_members_id=#{advMembersId}")
    public int deleteByAdvMembersId(@Param("advMembersId") String advMembersId);

    /**
     * 查询
     *
     * @param advIncomeId 主键
     * @return
     */
    public AdvIncome selectAdvIncomeByAdvIncomeId(Long advIncomeId);

    /**
     * 查询列表
     *
     * @param advIncome
     * @return 集合
     */
    public List<AdvIncome> selectAdvIncomeList(AdvIncome advIncome);

    /**
     * 新增
     *
     * @param advIncome
     * @return 结果
     */
    public int insertAdvIncome(AdvIncome advIncome);

    /**
     * 修改
     *
     * @param advIncome
     * @return 结果
     */
    public int updateAdvIncome(AdvIncome advIncome);

    /**
     * 删除
     *
     * @param advIncomeId 主键
     * @return 结果
     */
    public int deleteAdvIncomeByAdvIncomeId(Long advIncomeId);

    /**
     * 批量删除
     *
     * @param advIncomeIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAdvIncomeByAdvIncomeIds(Long[] advIncomeIds);

    //批量审批
    int batchSelect(@Param("advIncomeIds") List<Long> advIncomeIds,@Param("isAudit") String isAudit);

    List<AdvIncome> selectAdvIncomeByIds(List<Long> advIncomeIds);
}
